package com.bite;

public class Sort {

    /*
    * 直接插入排序*/

    public static void insertSort(int[] array) {
        for(int i = 1; i < array.length; i++) {
            int ret = array[i];
            int j = i - 1;
            for (; j >= 0 ; j--) {
                if (array[j] > ret) {
                    array[j + 1] = array[j];
                } else {
                    array[j +1] = ret;
                    break;
                }
            }
                array[j + 1] = ret;
        }
    }

    private static void swap(int x,int y) {
        int ret = x;
        x = y;
        y = ret;
    }

    /*
    * 希尔排序
    * */


}
